{% load static from staticfiles %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>点餐系统</title>
    <link rel="stylesheet" href="{% static 'web/static/css/common.css' %}">
    <link rel="stylesheet" href="{% static 'web/node_modules/bootstrap/dist/css/bootstrap.css' %}">
</head>
<body>
    <div class="container">
        <h1 class="form-heading">点餐系统登录页面</h1>
        <div class="login-form">
            <div class="main-div">
                <div class="panel">
                    <h2>点 餐 系 统 登 录 页 面</h2>
                </div>
                <form id="Login" action="{% url 'web_dologin' %}" method="post">
                    {% csrf_token %}
                    <div class="form-group">
                        <select name="shop_id" class="form-control">
                        <option value="0"> - - 请选择商铺名称 - - </option>
                        {% for shop in shopslist %}
                        <option value={{shop.id}}> {{shop.name}} </option>
                        {% endfor %}
                        </select>
                    </div>

                    <div class="form-group">
                        <input type="text" name="username" class="form-control"  placeholder="登录账号">
                    </div>
                    <div class="form-group">
                        <input type="password" name="password" class="form-control" placeholder="登录密码">
                    </div>
                    <div class="form-group">
                        <input type="text " name="code" style="display:inline;width:120px;float:left;" class="form-control" placeholder="验证码">
                        <img src="/web/verify" onclick="this.src='/web/verify?sn='+Math.random()" style="float:right:margin:5px 20px;">
                    </div>
                    <button type="submit" style="margin-top:10px" class="btn btn-primary">登录</button>
                </form>
                   <div class="form-group">
                        <p class="login-box-msg" style="color:red">
                        {% if typeinfo == 1 %}
                            请选择您所在的商铺！
                        {% elif typeinfo == 2 %}
                            验证码错误！
                        {% elif typeinfo == 3 %}
                            登录密码错误！
                        {% elif typeinfo == 4 %}
                            此用户为非法用户！
                        {% elif typeinfo == 5 %}
                            登录账号错误！
                        {% endif %}
                          </p>
                    </div>
            
    </div>
    
    <script src="{% static 'web/static/js/jquery.min.js' %}"></script>
    <script src="{% static 'web/node_modules/bootstrap/dist/js/bootstrap.min.js' %}"></script>
</body>
</html>